﻿<%@ Page Title="" Language="C#" MasterPageFile="~/BasicBase/BasicBase.master" AutoEventWireup="true"
    StylesheetTheme="Content" CodeFile="DutyReplace.aspx.cs" Inherits="BasicBase_Duty_DutyReplace" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <ul class="topmenu">
        <li>
            <asp:DropDownList ID="DptYear" runat="server" Width="120">
                <asp:ListItem Value="2008">2008年</asp:ListItem>
                <asp:ListItem Value="2009">2009年</asp:ListItem>
                <asp:ListItem Value="2010">2010年</asp:ListItem>
            </asp:DropDownList>
            &nbsp;<asp:DropDownList ID="DptMonth" runat="server" Width="120" AutoPostBack="true"
                OnSelectedIndexChanged="DptMonth_SelectedIndexChanged">
                <asp:ListItem Value="1">1月</asp:ListItem>
                <asp:ListItem Value="2">2月</asp:ListItem>
                <asp:ListItem Value="3">3月</asp:ListItem>
                <asp:ListItem Value="4">4月</asp:ListItem>
                <asp:ListItem Value="5">5月</asp:ListItem>
                <asp:ListItem Value="6">6月</asp:ListItem>
                <asp:ListItem Value="7">7月</asp:ListItem>
                <asp:ListItem Value="8">8月</asp:ListItem>
                <asp:ListItem Value="9">9月</asp:ListItem>
                <asp:ListItem Value="10">10月</asp:ListItem>
                <asp:ListItem Value="11">11月</asp:ListItem>
                <asp:ListItem Value="12">12月</asp:ListItem>
            </asp:DropDownList>
            &nbsp;<asp:DropDownList ID="DptDay" runat="server" Width="120">
            </asp:DropDownList>
            &nbsp;人员姓名：
            <asp:TextBox ID="TxtName" MaxLength="10" runat="server"></asp:TextBox>
        </li>
        <li>
            <asp:LinkButton ID="BtnSearch" runat="server" OnClick="BtnSearch_Click"> 查 询 </asp:LinkButton>
    </ul>
    <table border="0" cellpadding="0" cellspacing="0" class="dialog" width="770px">
        <caption>
            <span>值班人员列表</span></caption>
        <tr>
            <td style="margin: 0; padding: 0">
                <asp:GridView ID="GvwList" runat="server" AutoGenerateColumns="False" BorderColor="#CEE7F7"
                    BorderStyle="Solid" BorderWidth="0px" CellPadding="4" GridLines="None" Width="100%"
                    OnRowDataBound="GvwList_RowDataBound">
                    <Columns>
                        <asp:TemplateField ItemStyle-Width="30px" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Label ID="lblID" runat="server"></asp:Label>&nbsp;
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="值班日期">
                            <ItemTemplate>
                                <%# DateTime.Parse(Eval("DutyDate").ToString()).ToString("yy-MM-dd") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="值班类型">
                            <ItemTemplate>
                                <%# GetDutName(Eval("DutyType")) %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="UserName" HeaderText="值班人员" />
                        <asp:TemplateField ItemStyle-HorizontalAlign="Right">
                            <ItemTemplate>
                                <asp:ImageButton ID="IBtnEdit" ImageUrl="~/Images/Edit.gif " runat="server" Visible='<%# GetBool() %>'
                                    ToolTip="编辑" CommandArgument='<%# Eval("UserID") %>' 
                                    OnCommand="IBtnEdit_Command" CommandName='<%# Eval("ID") %>' />
                                <asp:ImageButton ID="IBtnDelete" ImageUrl="~/Images/delete.gif" runat="server" ToolTip="删除"
                                    Visible='<%# GetBool() %>' CommandArgument='<%# Eval("UserID") %>' CommandName='<%# Eval("ID") %>'
                                    OnCommand="IBtnDelete_Command" />
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                            </EditItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <RowStyle HorizontalAlign="Left" />
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:GridView>
            </td>
        </tr>
    </table>
    <asp:Panel ID="PanelEdit" Visible="false" Width="100%" runat="server">
        <table border="0" cellpadding="0" cellspacing="0" class="dialog" width="770px">
            <caption>
                <span>值班人员更换</span></caption>
            <tr>
                <td style="margin: 0; padding: 0;width:100%">
                <table width="750px">
                <tr>
                <td style="width:80px">
                    &nbsp; 值班类型：
                </td>
                <td style="width:280px">
                    <asp:Label ID="lblDutyType" ForeColor="Red" runat="server" Text=""></asp:Label>
                </td>
                <td style="width: 80px">
                值班日期：
                </td>
                    <td>
                        <asp:Label ID="lblDate" ForeColor="Red" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <tr>
                <td>
                    &nbsp; 原值班人员：
                </td>
                    <td>
                    <asp:Label ID="lblName" runat="server" ForeColor="Red" Text=""></asp:Label>
                    </td>
                    <td>
                    更新为：
                    </td>
                    <td>
                        <asp:DropDownList ID="DptNow" Width="100px" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                
                </table>               
                    
                </td>
            </tr>
            <tr>
            <td align="center">
                <asp:Button ID="BtnSave" runat="server" Text="保 存" onclick="BtnSave_Click" />
                <asp:Label ID="lblPromt" runat="server" ForeColor="Orange"></asp:Label>
            </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
